home *** CD-ROM | disk | FTP | other *** search
-
- N✓NA✓AM✓ME✓E
- make - The SozobonX make
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- m✓ma✓ak✓ke✓e [o✓op✓pt✓ti✓io✓on✓ns✓s] [<m✓ma✓ac✓cr✓ro✓o>=<v✓va✓al✓l>] ... [<t✓ta✓ar✓rg✓ge✓et✓t> ...]
-
- l✓ld✓d [-✓-V✓Vv✓vh✓he✓ei✓ik✓kn✓np✓pq✓qr✓rs✓st✓t]✓] [-]|[-f <m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e>] [-c|C <d✓di✓ir✓r>] [-L <s✓si✓iz✓ze✓e>]
- [<m✓ma✓ac✓cr✓ro✓o>=<v✓va✓al✓l>] ... [<t✓ta✓ar✓rg✓ge✓et✓t> ...]
-
- You have to keep this order in comandline: first the switches,
- then macro assignements and at last the targets!
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- m✓ma✓ak✓ke✓e is a tool to build one or more files from other files using
- rules describing the commands how to make a file from another.
- Therefore dependencies are listed in a m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e and in builtin
- r✓ru✓ul✓le✓es✓s so that m✓ma✓ak✓ke✓e knows which time-stamps of wich files it has
- to compare.
- This manual describes all features and options from Sozobon
- make. It is not a description of how to use make and writing
- makefiles. If you are not familiar with make read a general
- make documentation like the 'm✓ma✓ak✓ke✓e.✓.d✓do✓oc✓c' from this distribution
- or the G✓GN✓NU✓U make manual.
-
-
- T✓Th✓he✓e m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e
-
- m✓ma✓ak✓ke✓e looks at first for a makefile named 'M✓MA✓AK✓KE✓EF✓FI✓IL✓LE✓E', or
- 'M✓Ma✓ak✓ke✓ef✓fi✓il✓le✓e', or 'm✓ma✓ak✓ke✓ef✓fi✓il✓le✓e', if there is none specified in the
- commandline. This file has to be in cwd. m✓ma✓ak✓ke✓e will attempt to
- use its internal rules if no makefile exists, but a target was
- given on the command line. This means that simple programs in a
- single file can be made without a makefile by typing:
- make file.ttp
-
- ✓ i✓in✓nc✓cl✓lu✓ud✓de✓e ✓
- With the include directive the reading of current m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e
- is stopped, all specified files are processed like the
- default m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e , and after that the curent m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e
- processing is continued. Default targets are never taken
- from an include file!
-
- i✓in✓nc✓cl✓lu✓ud✓de✓e <f✓fi✓il✓le✓e> [<f✓fi✓il✓le✓e> ...]
- <✓<file>✓> may be a macro, known at this state, and have
- wildcards. Include files are searched like the ones in
- $✓$M✓MA✓AK✓KE✓EF✓FI✓IL✓LE✓ES✓S.
-
- ✓ l✓li✓in✓ne✓e ✓ c✓co✓on✓nt✓ti✓in✓nu✓ua✓at✓ti✓io✓on✓n ✓
- The line continuation character is '\✓\'. Back slashes may
- appear in pathname, but NOT at the end of a line, as it
- will be taken as a continuation backslash, and not as a
- part of the pathname. This should not create any big
- problem as far as i can see - just add a space at and of
- line.
-
- R✓Ru✓ul✓le✓es✓s
-
- If for a target with an extension (!!) no commands are
- specified, make tries to find an implicit rule that matches this
- target by testing possible dependencies. The assumed dependency
- is added to the target's dependency list, if it exists. If not,
- the extension of the assumed dependancy is compared with the
- first depandancy of the target, if it's the same the matching
- implicit rule will be used for this target. To pervent a
- problem with linking all dependencies (default rule) and im-
- plicit adding an assumed target, this not added for the default
- target (if there are any dependencies). So:
- foo.ttp: bar.o x.o y.o
- will run the linker with the commandline:
- cc -o foo.ttp bar.o x.o y.o
- And not add any dependency 'foo.o'. The imlicit rule used is:
- .o.ttp: $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES)
- The implicit rule used for a default target is searched by look-
- ing at the first dependency's suffix too! Think of this if you
- specify dependencies with different suffixes! For the default
- target you will have to write your own command(s) in this case.
- The implicit rules are always suffix rules. So your targets and
- dependencies must have a suffix form '.✓.S✓SU✓UF✓FF✓FF✓FI✓IX✓XE✓ES✓S' if they
- should be made with an implicit rule. You can of course define
- new implicit rules, or overwrite built-in ones. Don't forget to
- add the new suffixes to '.✓.S✓SU✓UF✓FF✓FI✓IX✓XE✓ES✓S'!
-
- The most important builtin rules are: (you can see all with
- option -✓-p✓p.)
- .c.o:
- $(CC) -c $(CFLAGS) $<
-
- .s.o:
- $(CC) -c $(CFLAGS) $<
-
- .c.ttp:
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LOADLIBES)
-
- .o.ttp:
- $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES)
-
- .s.ttp:
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LOADLIBES)
-
- .l.c:
- $(LEX) $(LFLAGS) $<
-
- .y.c:
- $(YACC) $(YFLAGS) $<
-
- M✓Ma✓ac✓cr✓ro✓os✓s
-
- Macros are normally set in the following order:
- internal defaults
- environment variables EXPORTED
- makefile assignments
- commandline assignements EXPORTED
- If the -✓-e✓e assignments in the makefile and the order becomes:
- internal defaults
- makefile assignments
- environment variables EXPORTED
- commandline assignements EXPORTED
-
- Internal (predefined) macros are:
- PATH = \usr\bin,\bin
- SHPREFIX = -c
- CC = cc
- AR = ar
- TEX = tex
- LEX = lex
- YACC = yacc
- CFLAGS =
- LDFLAGS =
- LOADLIBES =
- TFLAGS =
- ARFLAGS =
- MAKE = make
- MAKEFLAGS =
- The macros $(M✓MA✓AK✓KE✓E) and $(M✓MA✓AK✓KE✓EF✓FL✓LA✓AG✓GS✓S) are set to the values,
- m✓ma✓ak✓ke✓e was invoked with. The -✓-c✓c and the -✓-f✓f switch with their
- arguments are of course not inherited into macro $(M✓MA✓AK✓KE✓EF✓FL✓LA✓AG✓GS✓S).
- Both are not exported by default, but maybe used to run nested
- makefiles and, if you want so, keeping the options the first
- m✓ma✓ak✓ke✓e was started with.
-
- The syntax for recognizing a macro/variable is: $✓$(✓(VAR)✓) or
- $✓${✓{VAR}✓},✓, where 'V✓VA✓AR✓R' is the variable/macro name. To define a
- variable/macro in a makefile write: '<m✓ma✓ac✓cr✓ro✓o> =✓= <v✓va✓al✓lu✓ue✓e>' where
- the rest of the line gets the value, skipping leading and trail-
- ing whitespaces.
- A macro/variable is evaluted immediately when found while read-
- ing the makefile, if it is part of another variable's value, a
- target, a dependency or any statement's argument.
- It is evaluated when used, if it is in a commandline in a rule,
- or in a commandline for an explicit target.
- Special variables with the syntax %✓%(✓(VAR)✓) or %✓%{✓{VAR}✓} are only
- allowed in dependency lists. These variables make it easier
- e.g. to add a dependency build from the name of the target but
- without the path part there:
- $(OBJECTS): %(*F).c $(HEADERS)
- cc -o $(*).o $(*F).c
- This is expanded for every target in $(OBJECTS) to:
- <pathtarget.suffix>: <target>.c 1.h 2.h ..
- cc -o pathtarget.o target.c
-
- ✓ b✓bu✓ui✓il✓lt✓ti✓in✓ns✓s ✓
-
- ✓ e✓ex✓xp✓po✓or✓rt✓t ✓
- Global export: Export all macros from makefiles via en-
- vironment to subsequent processes (nested makes, or other
- child processes). this directive works only if no unexport
- follows
-
- ✓ e✓ex✓xp✓po✓or✓rt✓t ✓ <m✓ma✓ac✓cr✓ro✓o> ...
- Export all specified macros as environment variables, they
- must not exist until this directive is read, a global un-
- export does not affect this directive.
-
- ✓ e✓ex✓xp✓po✓or✓rt✓t ✓ <m✓ma✓ac✓cr✓ro✓o> = <value>
- Defines a macro and makes it exportable at same time.
- Exported macros are expanded before putting them into
- environment! In a subsequent make you can use them as
- macros again.
-
- ✓ u✓un✓ne✓ex✓xp✓po✓or✓rt✓t ✓
- Don't export any macros from any makefile; this is default,
- and resets only a earlier global export directive (from
- another included makefile perhaps); the last export or
- unexport directive is valid
-
- ✓ u✓un✓ne✓ex✓xp✓po✓or✓rt✓t ✓ <m✓ma✓ac✓cr✓ro✓o> ...
- Do not export the specified macros, even environment vari-
- ables or commandline assignements are affected; a global
- export directive does not change the macros' status.
-
- ✓ u✓un✓ne✓ex✓xp✓po✓or✓rt✓t ✓ <m✓ma✓ac✓cr✓ro✓o> = <value>
- Define a macro and make it private (usefull if it was an
- environment variable).
-
- ✓ o✓ov✓ve✓er✓rr✓ri✓id✓de✓e ✓ <m✓ma✓ac✓cr✓ro✓o> = value
- Define a macro and prevent it from being overwritten; sub-
- sequent assignements to this macro (e.g. from commandline)
- will not replace the current value, but be appended to the
- end.
-
- P✓Ph✓ho✓on✓ny✓y (✓(s✓sp✓pe✓ec✓ci✓ia✓al✓l)✓) T✓Ta✓ar✓rg✓ge✓et✓ts✓s
-
-
- ✓ .✓.S✓SU✓UF✓FF✓FI✓IX✓XE✓ES✓S ✓
- The list of dependecies, recognized by make.
-
- ✓ .✓.P✓PR✓RE✓EC✓CI✓IO✓OU✓US✓S ✓
- Dependencies of .PRECIOUS are not deleted if a command
- fails, by default it has no dependencies.
-
- ✓ .✓.I✓IG✓GN✓NO✓OR✓RE✓E ✓
- Sets a global switch like -✓-i✓i (ignore).
-
- ✓ .✓.S✓SI✓IL✓LE✓EN✓NT✓T ✓
- Sets a global switch like -✓-s✓s (silent).
-
- ✓ .✓.S✓ST✓TR✓RI✓IP✓PP✓PA✓AT✓TH✓H ✓
- The path part of every target's name is stripped when
- making the implicit dependency. This makes it easier to
- compile objects from a sourcecode for different program
- versions into diffferent directories. This is some sort
- of a global %✓%(✓(*✓*F✓F)✓) for all inplicit dependencies.
-
- ✓ .✓.S✓SH✓HE✓EL✓LL✓L ✓
- Sets a global switch: all commandlines are passed to the
- shell $✓$S✓SH✓HE✓EL✓LL✓L.
-
- C✓Co✓om✓mm✓ma✓an✓nd✓dl✓li✓in✓ne✓e P✓Pr✓re✓ef✓fi✓ix✓xe✓es✓s
-
- You can prefix each commandline in the makefile with one or more
- of the following prefix chars. The '@✓@' and '-✓-' prefixes must be
- first ones, the excluding '%✓%' and '!✓!' may follow. These
- prefixes modify the commandline handling.
-
- ✓ @✓@ ✓
- Sets the silent switch to this single comandline.
-
- ✓ -✓- ✓
- Sets the ignore switch to this single comandline.
-
- ✓ !✓! ✓ ✓
- By default this make executes all commandlines by self.
- This prefix makes m✓ma✓ak✓ke✓e to pass this single commandline
- to a shell. This is an important feature, cause m✓ma✓ak✓ke✓e
- performs no expansions than wildcard expansion on the
- commandlines.
-
- ✓ %✓% ✓
- Forces make to treat the command in this line as an
- builtin one.
-
- A✓Au✓ut✓to✓om✓ma✓at✓ti✓ic✓c v✓va✓ar✓ri✓ia✓ab✓bl✓le✓es✓s
-
-
- ✓ $✓$@✓@ ✓
- Is the current target of an implicit rule, or an ex-
- plicit one with multiple targets. $✓$(✓(@✓@F✓F)✓) is the filename
- part of $✓$@✓@ , and $✓$(✓(@✓@D✓D)✓) the path in $✓$@✓@.
-
- ✓ $✓$*✓* ✓
- This the basename of the curent target. This works only
- if the target has a recognized suffix. $✓$(✓(*✓*F✓F)✓) is the
- filename part of $✓$*✓* , and $✓$(✓(*✓*D✓D)✓) the path in $✓$*✓*
- ✓ $✓$<✓< ✓
- This is the name of the first dependency. If the target
- got it's commands from an implicit rule, this will be
- the first dependency added by this rule. $✓$(✓(<✓<F✓F)✓) is the
- filename part of $✓$<✓< , and $✓$(✓(<✓<D✓D)✓) the path in $✓$<✓<
-
- ✓ $✓$^✓^ ✓
- This macro contains the names of all dependencies, with
- spaces between them. This is useful for linking a
- file. (See default rules).
-
- ✓ $✓$?✓? ✓ ✓
- The names of all dependencies that are newer than the
- target, with spaces between them. This maybe useful in
- explicit rules when you want to work only with the
- changed files. For example to update an archive:
-
- W✓Wi✓il✓ld✓dc✓ca✓ar✓rd✓ds✓s
-
- This make tries to expand every token containing a wildcard
- character like: '*✓*' or '?✓?' or '[✓[' as a filename. The token
- is replaced by the matching filenames found. It uses usual
- FNRexpressions as wildcards: '*' '?' '[...]' '[?-?]' '[^...]'
-
- O✓OP✓PT✓TI✓IO✓ON✓NS✓S
-
- ✓ -✓--✓-v✓ve✓er✓rs✓si✓io✓on✓n ✓
- ✓ -✓-V✓V ✓
- Print detailed Version information to stdout and exit
-
- ✓ -✓--✓-h✓he✓el✓lp✓p ✓
- ✓ -✓-h✓h ✓
- Print the help page and exit
-
- ✓ -✓-v✓v ✓ (verbose)
- Generally show more information about what m✓ma✓ak✓ke✓e is doing
- and print short version information (to stderr).
-
- ✓ -✓- ✓
- Read the m✓ma✓ak✓ke✓ef✓fi✓il✓le✓e from stdin.
-
- ✓ -✓-c✓c ✓ <d✓di✓ir✓r> (cd)
- Change the current working directory to <d✓di✓ir✓r> before run-
- ning (and looking for a makefile).
-
- ✓ -✓-f✓f ✓ <f✓fi✓il✓le✓e> (file)
- Use and read file <f✓fi✓il✓le✓e> as makefile.
-
- ✓ -✓-L✓L ✓ <s✓si✓iz✓ze✓e> (line)
- Set the internal buffer size for reading and expand lines
- from a makefile to <✓<s✓si✓iz✓ze✓e>✓> KBytes. Default size is 4K, you
- l✓li✓in✓ne✓e ✓ t✓to✓oo✓o ✓ l✓lo✓on✓ng✓g or a similiar one.
-
- ✓ -✓-e✓e ✓ (env)
- The environment variables overwrite the makefile's
- variables.
-
- ✓ -✓-s✓s ✓ (silent)
- Don't print anything except error messages.
-
- ✓ -✓-i✓i ✓ (ignore)
- Ignore the exit status of the commands excuted by make: just
- execute all comands.
-
- ✓ -✓-k✓k ✓ (keep)
- Keep going on processing the makefile after an error. This
- is much better than -✓-i✓i cause the next target will be made
- after an error until make can't do anything more.
-
- ✓ -✓-n✓n ✓
- Do nothing, just tell what make would do (e.g. for testing
- makefiles).
-
- ✓ -✓-q✓q ✓ (question)
- Do nothing but test the target. If it is not up to date make
- will return a status of 1.
-
- ✓ -✓-t✓t ✓ (touch)
- Don't really make any targets, but touch the files which need
- an update.
-
- E✓EN✓NV✓VI✓IR✓RO✓ON✓NM✓ME✓EN✓NT✓T
- The environment is read and macros corresponding to the vari-
- ables found are initialized within make. This means that set-
- ting the variable $✓$P✓PA✓AT✓TH✓H causes make to set the macro P✓PA✓AT✓TH✓H to
- the value found and use that for command searches as described
- above. With a macro assignement in commandline you can over-
- write any macro, from makefile and environment, too.
-
- If a environment variable '$✓$M✓MA✓AK✓KE✓EF✓FI✓IL✓LE✓ES✓S' exists, it's value is
- used as a list of makefiles to include. The default target is
- never taken from one of these files, but they are read at
- first. If there are no absolut paths specified in the
- filenames, they are searched in the paths of '$INCLUDEDIR' and a
- directory 'make' in that path. If there is no environment vari-
- able '$INCLUDEDIR' or '$INCLUDE' (a list of inlude paths)
- '\usr\include,\usr\local\include' is assumed.
-
- $✓$I✓IN✓NC✓CL✓LU✓UD✓DE✓ED✓DI✓IR✓R This path replaces the builtin search pathes for
- include makefiles not to find in cwd.
-
- $✓$I✓IN✓NC✓CL✓LD✓DU✓UE✓E A list of pathes where makefiles to incldue are
- searched. If $✓$S✓ST✓TD✓DE✓ER✓RR✓R is present, stderr handle (2) is used for
- diagnostic output.
-
- D✓DI✓IA✓AG✓GN✓NO✓OS✓ST✓TI✓IC✓CS✓S
- m✓ma✓ak✓ke✓e will claim about a missing target, if there is none in
- commandline or the makefile. If it finds a syntax error in the
- makefile it will report this and exit.
-
- S✓SE✓EE✓E ✓ A✓AL✓LS✓SO✓O
- cc(1)
-
- B✓BU✓UG✓GS✓S
- Without doubt, there are some bugs in this program. If you
- discover one, please report it to maintainer.
-
- A✓AU✓UT✓TH✓HO✓OR✓R
- PD make Adapted from mod.sources Vol 7 Issue 71, 1986-12-03.
- port to ATARI TOS by Jwahar Bammi & Ton van Overbeek
- adapted for SOZOBON by Tony Andrews 1988
-
- eXtended Version by Jerry G Geiger (1992-1995)
-
- V✓VE✓ER✓RS✓SI✓IO✓ON✓N
- make V2.04 Mar 30 1995
-
-